package com.cust.cow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cust.cow.pojo.quarantineLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Mapper
public interface QuarantineLogMapper extends BaseMapper<QuarantineLogMapper> {
    @Select("select * from quarantineLog")
    public List<quarantineLog> findQuarantineLogAll();

    @Insert("insert into quarantineLog values(#{cattleId}, #{quarantineDate}, #{state})")
    public int insertQuarantineLog(@RequestBody quarantineLog quarantineLog);

    @Delete("delete from quarantineLog where cattle_id = #{cattleId}")
    public int deleteQuarantineLog(Integer cattleId);
}
